From 78df2fef6c1c67fe0e97c8ccb717b0bfb63e84ea Mon Sep 17 00:00:00 2001 From: oliskoli Date: Sun, 7 Sep 2008 16:50:23 +0000 Subject: [PATCH] magnav: Check for a valid creation time. --- magnav.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magnav.c b/magnav.c index d1e91d3c9..038cd8919 100644 --- a/magnav.c +++ b/magnav.c @@ -119,8 +119,8 @@ data_read(void) tm.tm_mday = be_read16(&rec->crt_mday); tm.tm_mon = be_read16(&rec->crt_mon) - 1; tm.tm_year = be_read16(&rec->crt_year) - 1900; - wpt_tmp->creation_time = mktime(&tm); - + if (mkgmtime(&tm) > 0) + wpt_tmp->creation_time = mktime(&tm); waypt_add(wpt_tmp); } -- 2.30.2